#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
    int n = 0;
    int min = 0;
    scanf("%d", &n);
    int a = ++n;
    if (a % 12)
    {
        min = (a / 12) * 4 + 2;
    }
    else
    {
        min = (a / 12) * 4;
    }
    printf("%d\n", min);
    return 0;
}